//
//  ViewController.m
//  GetDeviceModel
//
//  Created by Liyn on 2016/12/26.
//  Copyright © 2016年 Liyn. All rights reserved.
//

#import "ViewController.h"
#import "ViewSize.h"
#import "UIDevice+UIDeviceExtension.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    
    UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake((ScreenWidth()-300)/2.00, 200, 300, 20)];
    label1.text = [NSString stringWithFormat:@"设备描述: %@",[UIDevice getCurrentDeviceModelDescription]];
    
    label1.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:label1];
    

    
    UILabel *label3 = [[UILabel alloc] initWithFrame:CGRectMake((ScreenWidth()-300)/2.00, 280, 300, 20)];
    label3.text = [NSString stringWithFormat:@"设备型号: %@",[UIDevice getCurrentDeviceModel]];
    label3.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:label3];
    

    
    UILabel *label5 = [[UILabel alloc] initWithFrame:CGRectMake((ScreenWidth()-300)/2.00, 360, 300, 20)];
    label5.text = [NSString stringWithFormat: @"iOS版本: %@",[[UIDevice currentDevice] systemVersion]];;
    label5.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:label5];
    

    // Do any additional setup after loading the view, typically from a nib.
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
